package com.zc.app.shiro.service;

import com.zc.app.shiro.peer.ResourcePeer;

import java.util.List;
import java.util.Set;


public interface ResourceService {


    public ResourcePeer createResource(ResourcePeer resource);
    public ResourcePeer updateResource(ResourcePeer resource);
    public void deleteResource(Long resourceId);

    ResourcePeer findOne(Long resourceId);
    List<ResourcePeer> findAll();

    /**
     * 得到资源对应的权限字符串
     * @param resourceIds
     * @return
     */
    Set<String> findPermissions(Set<Long> resourceIds);

    /**
     * 根据用户权限得到菜单
     * @param permissions
     * @return
     */
    List<ResourcePeer> findMenus(Set<String> permissions);
}
